package com.gm.app.data;

import javax.persistence.TypedQuery;

import org.springframework.beans.factory.annotation.Configurable;

import com.gm.app.model.Indication;

@Configurable
public class IndicationDAO extends RegisterDAO {

	private static IndicationDAO dao = null;

	public static IndicationDAO get() {
		if (dao == null) {
			dao = new IndicationDAO();
		}
		return dao;
	}

	public static TypedQuery<Indication> search(String name, String address,
			String country, String comments, Integer start, Integer page) {
		return IndicationDAO.get().search(name, address, country, comments,
				start, page, Indication.class);

	}

	public static TypedQuery<Indication> search(String name, String address,
			String country, String comments) {
		return IndicationDAO.get().search(name, address, country, comments,
				null, null, Indication.class);

	}
}
